package com.mh.study.dubbo;

import com.mh.study.dubbo.service.HelloService;

import java.util.ServiceLoader;

/**
 * @author meng.han
 * @since 2022-01-18
 */
public class JavaSpiMain {

    public static void main(String[] args) {
        ServiceLoader<HelloService> loader = ServiceLoader.load(HelloService.class);
        for (HelloService helloService : loader) {
            System.out.println(helloService.getClass().getName() + ":" + helloService.sayHello());
        }
    }

}
